﻿//-----------------------------------------------------------------------
// <copyright file="Module.cs">
//     Copyright (c) Nicole Calinoiu. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Xml;

using Microsoft.FxCop.Sdk;

namespace Bordecal.FxCop.Sdk.Testing
{
	/// <summary>
	/// Represents a .NET module screened by FxCop.
	/// </summary>
	internal sealed class Module : Target
	{
		internal Module(Assembly parent, XmlElement element)
			: base(parent, element)
		{
		}

		[SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase",
			Justification = "Must be converted to lower case for compatibility with FxCop report generator.")]
		internal Module(ModuleNode module)
			: base(new Assembly(module.ContainingAssembly), Path.GetFileName(module.Location).ToLowerInvariant())
		{
		}
	}
}